import request from '@/axios'
import type { AccountParams, UserType, VerifyType } from './types'

// 获取图片
export const getSlideImage = async () => {
  return request.get({ url: '/Api/FCCaptcha/SlideImage' })
}
// 验证
export const captchaVerify = async (data: VerifyType): Promise<IResponse<VerifyType>> => {
  return request.post({ url: '/Api/FCCaptcha/Verify', data })
}
// 获取码
export const getEncryptCode = async () => {
  return request.get({ url: '/Api/FALogin/EncryptCode' })
}
// 获取用户信息
export const getInfoApi = (params: AccountParams) => {
  return request.get({ url: '/Api/FAAccount/Com_Info', params })
}
// 登录
export const login = (data: UserType): Promise<IResponse<UserType>> => {
  return request.post({ url: '/Api/FALogin/Login', data })
}
